package cn.jieruoda.eb.user.domain.repository;

import cn.jieruoda.eb.user.domain.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface UserRepository extends JpaRepository<User, Integer> {
    Optional<User> findByAccount(String account);
    Optional<User> findByPhone(String phone);
    boolean existsByAccount(String account);
    boolean existsByPhone(String phone);
} 